/**
 * 先写流动模式
 *      流动模式不走缓存
 */

let fs = require('fs')
let ReadStream = require('./readStream')
let rs = new ReadStream('./1.txt', {
    flags: 'r',
    mode: 0o666,
    start: 3,
    end: 7,
    highWaterMark: 3,
    autoClose: true,
    encoding: 'utf8'
})
rs.on('data', data=>{
    console.log(data)
})
rs.on('end', data=>{
    console.log('end')
})
rs.on('open', ()=>{
    console.log('open')
})
rs.on('close', ()=>{
    console.log('close')
})

